package day06;

import java.io.File;
import java.io.FileFilter;

import org.junit.Test;

/**
 * 获取并输出当前目录下所有文件的名字
 * @author Bonnie
 *
 */
public class Test06 {
	@Test
	public void test() {
		File file = new File(".");
		File[] files = file.listFiles(new FileFilter() {

			@Override
			public boolean accept(File pathname) {
				return pathname.isFile();
			}
			
		});
		for (File f : files) {
			System.out.println(f);
		}
	}
}
